package com.ofwiki.demo.model;

import java.io.Serializable;
import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.experimental.Accessors;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.TableName;
import org.springframework.format.annotation.DateTimeFormat;


/**
 * 定时任务执行日志(JobLogs)实体类
 *
 * @author huang.js
 * @version 1.0
 * @date 2023-03-18
 */
@Data
@Accessors(chain = true)
@ApiModel
@TableName(value = "tb_job_logs")
public class JobLogs implements Serializable {
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;
    @ApiModelProperty(value = "任务id", required = true)
    private Long jobId;
    @ApiModelProperty(value = "任务名称")
    private String jobName;
    @ApiModelProperty(value = "服务名称")
    private String serviceName;
    @ApiModelProperty(value = "开始时间", required = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
    private LocalDateTime startTime;
    @ApiModelProperty(value = "结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
    private LocalDateTime endTime;
    @ApiModelProperty(value = "执行参数")
    private String param;
    @ApiModelProperty(value = "执行主机ip")
    private String execHost;
    @ApiModelProperty(value = "执行状态:0->调度中(默认);200->成功;500->异常;", required = true)
    private Integer execStatus;
    @ApiModelProperty(value = "执行状态:0->执行中;200->成功;其它业务自己定义...")
    private Integer responseCode;
    @ApiModelProperty(value = "执行状态:0->执行中;200->成功;其它业务自己定义...")
    private String responseMsg;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
    private LocalDateTime createTime;
}
